package com.studyroom.controller;

import com.studyroom.dto.Result;
import com.studyroom.service.MailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/mail")
public class MailController {
    @Autowired
    private MailService mailService;

    @RequestMapping("/receive")
    public Result receive(){
        return mailService.receive();
    }
    @RequestMapping("/clear")
    public Result clear(){
        return mailService.clear();
    }
}
